package com.health.circle.controller;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.health.circle.mapper.DepartmentMapper;
import com.health.circle.mapper.DiseaseMapper;
import com.health.circle.service.DepartmentService;
import com.health.circle.service.DiseaseService;
import com.health.common.core.domain.R;

import com.health.common.core.po.DepartmentPo;
import com.health.common.core.po.DiseasePo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @BelongsProject: dimensionality-manage
 * @BelongsPackage: com.health.circle.controller
 * @Author: 许力匀
 * @CreateTime: 2024-12-16  10:06
 * @Description: 科室，病症
 * @Version: 1.0
 */
@RestController
@RequestMapping("Disease")
public class DepartmentController {
    /*
    科室
     */
    @Autowired
    private DepartmentService departmentService ;

    /*
    病症
     */
    @Autowired
    private DiseaseService diseaseService;



    /**
     * 科室列表
     * @
     */
    @GetMapping("DepartmentList")
    R<List<DepartmentPo>> listDepart(@RequestParam(required = false)  Integer id)
    {

      return R.ok(departmentService.getDepartment(id)) ;
    }


    /**
     * 病症列表
     */
    @GetMapping("DiseaseList")
        R<List<DiseasePo>> listDisease(@RequestParam(required = false) Integer departmentId)
    {

        return R.ok(diseaseService.getDisease(departmentId));
    }



}
